{{ if default true .Site.Params.CarouselHomepage.enable }}
{{ if gt (len .Site.Data.carousel) 0 }}
<section>
    <div class="home-carousel">
        <div class="dark-mask"></div>
        <div class="container">
            <div class="homepage owl-carousel"
                data-autoplay="{{ default true .Site.Params.CarouselHomepage.auto_play }}"
                data-slide-speed="{{ default 2000 .Site.Params.CarouselHomepage.slide_speed }}"
                data-pagination-speed="{{ default 1000 .Site.Params.CarouselHomepage.pagination_speed }}">
                {{ range sort .Site.Data.carousel "weight" }}
                <div class="item">
                    <div class="row">
                        <div class="col-sm-5 right">
                            <h1>{{ .title }}</h1>
                            {{ .description | safeHTML }}
                        </div>
                        <div class="col-sm-7">
                            <img class="img-responsive" src="{{ .image }}" alt="">
                        </div>
                    </div>
                </div>
                {{ end }}
            </div>
            <!-- /.project owl-slider -->
        </div>
    </div>
</section>
{{ end }}
{{ end }}
